package com.example.common.model;

/**
 * @Author: zhuxiaokang
 * @CreateTime: 2025-04-03
 * @Description:
 * @Version: 1.0
 */

public enum ResultCode {
    // 枚举值
    SUCCESS(200, "成功"),
    FAILED(400, "请求失败"),
    UNAUTHORIZED(401, "未登录"),
    FORBIDDEN(403, "无访问权限"),
    NOT_FOUND(404, "资源不存在"),
    INTERNAL_SERVER_ERROR(500, "服务器内部错误");

    private int code;
    private String message;

    ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
